﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DAC.ServiceContracts
{
    /// <summary>
    /// will be used as a generic response
    /// </summary>
    public class Response
    {
        /// <summary>
        /// Gets or sets a value indicating whether this service method response is successful.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this service method transaction is successful; otherwise, <c>false</c>.
        /// </value>     
        public bool IsSuccessful { get; set; }

        /// <summary>
        /// Gets or sets the response code.
        /// </summary>
        /// <value>
        /// The response code.
        /// </value>       
        public int Code { get; set; }

        /// <summary>
        /// Gets or sets the response message.
        /// </summary>
        /// <value>
        /// The response message.
        /// </value>       
        public string Message { get; set; }
    }

    /// <summary>
    /// Wraps a return value in service methods.
    /// </summary>
    /// <typeparam name="T">The return value type.</typeparam>  
    public class Response<T> : Response
    {
        /// <summary>
        /// Gets or sets the return value.
        /// </summary>
        /// <value>
        /// The return value.
        /// </value>       
        public T ReturnModel { get; set; }
    }
}
